#ifndef _LOSE_LAYER_H_
#define _LOSE_LAYER_H_

#include "NTgames.h"
#include "MainMenuLayer.h"

#include "serial.h"
//#include "GameLayer.h"

class MainMenuLayer : public NTLayer
{
public:
	static void sendToServer();
	virtual void keyBackClicked()
	{
		IngameLayer* game = (IngameLayer*)this->getParent()->getChildByTag(999);
		if (game->getRunning())
		{			
			CCLOG("SET PAUSE");
			game->setPause();
		}
		else
		{
			CCLOG("SET RESUME");
			game->setResume();
		}
	}
	virtual bool init() {this->setKeypadEnabled(true); return true;}; 
	CREATE_FUNC(MainMenuLayer);
};


class LoseLayer : public NTLayer
{
public:
	LoseLayer() {MainMenuLayer::sendToServer();};
	CREATE_FUNC(LoseLayer);
};

#endif
